export const mixins = {
    data(){
        return{
            tableHeight: '650px',
        }
    },
    // 生命周期函数
    mounted() {
        window.addEventListener('resize', this.updateTableHeight)
    },
    beforeDestroy(){
        window.removeEventListener('resize', this.updateTableHeight)
    },
    created() {
        this.updateTableHeight()
    },
    // 计算函数
    computed: {
    },
    // 混入方法
    methods: {
        /**
         * @desc   : 更新表格高度
         * @author : 刘尧
         * @date   : 2025/02/07 15:02
         */
        updateTableHeight(){
            this.$nextTick(() => {
                const windowHeight = document.documentElement.clientHeight
                const tableHeight = windowHeight - this.$refs.queryForm.$el.clientHeight - 43 - 60 - 64 - 80
                this.tableHeight = tableHeight.toString() + 'px'
            })

        }
    }
}
